package CtrLayer;

import java.util.regex.*;

public class EmailValidator {
	private static Pattern pattern = Pattern.compile("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$");;
	private static Matcher matcher;
	
	public static boolean validate(final String email) {
		matcher = pattern.matcher(email);
		return matcher.matches();
	}
}
